package com.wfm.ch1.di;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service //1
public class UseService {
    @Autowired //2
    List<MyService> serviceList;

    public void printService(){
        for (int i = 0; i < serviceList.size(); i++) {
            System.out.println(serviceList.get(i).getName());
        }
    }
}
